import './App.scss'
import React from 'react'
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'
import { ProtectedRoute } from './router'
import Admin from './views/Admin'
import Login from './views/Login'
import { useLanguage } from './locales/intlUse'

function App() { 
  useLanguage()
  return (
    <Router>
      <Switch>
        <Route path="/login" exact component={Login} />
        <ProtectedRoute path="/" component={Admin} />
      </Switch>
    </Router>
  );
}

export default App;
